/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package do_.com.bpd.hrtoolspersistence.configuration.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Developer
 */
@Entity
@Table(name = "hrtools_config", catalog = "hrtoolsdb", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "HrtoolsConfig.findAll", query = "SELECT h FROM HrtoolsConfig h"),
    @NamedQuery(name = "HrtoolsConfig.findById", query = "SELECT h FROM HrtoolsConfig h WHERE h.id = :id"),
    @NamedQuery(name = "HrtoolsConfig.findByConfigName", query = "SELECT h FROM HrtoolsConfig h WHERE h.configName = :configName"),
    @NamedQuery(name = "HrtoolsConfig.findByTimeStamp", query = "SELECT h FROM HrtoolsConfig h WHERE h.timeStamp = :timeStamp")})
public class HrtoolsConfig implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id", nullable = false)
    private Integer id;
    @Basic(optional = false)
    @Column(name = "config_name", nullable = false, length = 255)
    private String configName;
    @Lob
    @Column(name = "config_value", length = 65535)
    private String configValue;
    @Lob
    @Column(name = "comment", length = 65535)
    private String comment;
    @Column(name = "time_stamp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date timeStamp;

    public HrtoolsConfig() {
    }

    public HrtoolsConfig(Integer id) {
        this.id = id;
    }

    public HrtoolsConfig(Integer id, String configName) {
        this.id = id;
        this.configName = configName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }

    public String getConfigValue() {
        return configValue;
    }

    public void setConfigValue(String configValue) {
        this.configValue = configValue;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Date getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Date timeStamp) {
        this.timeStamp = timeStamp;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HrtoolsConfig)) {
            return false;
        }
        HrtoolsConfig other = (HrtoolsConfig) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "do_.com.bpd.hrtoolspersistence.configuration.entities.HrtoolsConfig[ id=" + id + " ]";
    }
    
}
